<?php
  $result= json_encode(array(
	"success"	=>	true,
        "id"        =>  $id
   ));
?>

<script language="javascript" type="text/javascript">window.top.window.stopUpload('<?php echo $result; ?>');</script>